Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws/signer/v4: Fix X-Amz-Content-Sha256 being in to query for presign #1976

Merged
merged 1 commit into from
Jun 12, 2018

Conversation

jasdel
Copy link
Contributor

@jasdel jasdel commented Jun 7, 2018

Fixes the bug which would allow the X-Amz-Content-Sha256 header to be
promoted to the query string when presigning a S3 request.

This bug also was preventing users from setting their own sha256 value
for a presigned URL. Presigned requests generated with the custom sha256
would of always failed with invalid signature.

S3 presign requests without a user specified X-Amz-Content-Sha256 will
no longer include the X-Amz-Content-Sha256 in the header nor query. The
X-Amz-Content-Sha256 header only needs to be set if it contains a non
UNSIGNED-PAYLOAD value.

Fix #1974

@jasdel jasdel added the bug This issue is a bug. label Jun 7, 2018
@jasdel jasdel self-assigned this Jun 7, 2018
@jasdel jasdel added Review Needed and removed bug This issue is a bug. labels Jun 7, 2018
Fixes the bug which would allow the X-Amz-Content-Sha256 header to be
promoted to the query string when presigning a S3 request.

This bug also was preventing users from setting their own sha256 value
for a presigned URL. Presigned requests generated with the custom sha256
would of always failed with invalid signature.

S3 presign requests without a user specified X-Amz-Content-Sha256 will
no longer include the X-Amz-Content-Sha256 in the header nor query. The
X-Amz-Content-Sha256 header only needs to be set if it contains a non
UNSIGNED-PAYLOAD value.

Fix aws#1974
@jasdel jasdel merged commit 8e329ea into aws:master Jun 12, 2018
@jasdel jasdel deleted the bug/S3ContentSha branch June 12, 2018 20:49
jasdel added a commit that referenced this pull request Jun 12, 2018
@awstools awstools mentioned this pull request Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants